package com.hzt.agprosaleplatform.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzt.agprosaleplatform.entity.Order;
import com.hzt.agprosaleplatform.entity.OrderCreateDTO;
import com.hzt.agprosaleplatform.entity.OrderDetailDTO;
import com.hzt.agprosaleplatform.common.CustomResponse;

import java.util.List;
import java.util.Map;

public interface OrderService extends IService<Order> {
    Order createOrder(OrderCreateDTO orderCreateDTO);

    List<Order> selectOrderByUid(String uid);

    List<OrderDetailDTO> getOrderDetailsByUid(String uid);

    List<Order> selectOrderByShopId(Integer shop_id);

    boolean updateOrderStatus(Integer oid, Integer status);

    CustomResponse deleteOrder(Integer oid);
    
    /**
     * 获取店铺订单统计数据
     * @param shopId
     * @return
     */
    Map<String, Object> getShopOrderStatistics(Integer shopId);
    
    /**
     * 获取店铺收入趋势
     * @param shopId
     * @return
     */
    List<Map<String, Object>> getShopRevenueTrend(Integer shopId);
    
    /**
     * 获取店铺订单状态统计
     * @param shopId
     * @return
     */
    List<Map<String, Object>> getShopOrderStatusStats(Integer shopId);
}